<?php
use Yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\helpers\Url;
$this->title = '课程设置';
?>
<div class="container">
    <div class="row">
      
        <?php echo $this->render('_leftnav') ?>
        <div class="col-md-10">
          <div class="page-header clearfix">
            <h1 class="pull-left">课程</h1>
            <div class="pull-right">

                                            
            </div>
          </div>

          
           <?php echo $this->render('_coursesetting') ?>

	        <?php
	        $form = ActiveForm::begin([
		        'options' => ['class' => 'form-horizontal','id'=>'site-form','enctype' => 'multipart/form-data'],
		        'action'=>Url::to(['system/coursesave']),
		        'method'=>'post',
		        'fieldConfig' => [
			        'template' => '<div class="form-group"><div class="col-md-3 control-label">{label}</div><div class="controls col-md-8 radios">{input}{error}</div></div>'
		        ],
	        ]);
	        ?>
<!--<form class="form-horizontal" method="post" id="course-form" novalidate="">-->

  <fieldset>

	  <?= $form->field($model, 'messages_status')->radioList(['1'=>'开启','0'=>'关闭']) ?>

<!--    <div class="form-group">-->
<!--      <div class="col-md-3 control-label">-->
<!--        <label>给新学员发送欢迎私信</label>-->
<!--      </div>-->
<!--      <div class="controls col-md-8 radios">-->
<!--        <label><input name="welcome_message_enabled" value="1" checked="checked" type="radio"> 开启</label><label><input name="welcome_message_enabled" value="0" type="radio"> 关闭</label>-->
<!--      <p class="help-block">开启后，新学员加入课程后，会收到教师的欢迎私信</p>-->
<!--      </div>-->
<!--    </div>-->

	  <?= $form->field($model, 'message_content',['inputOptions'=>['placeholder'=>'{{nickname}},欢迎加入课程{{course}}'],'template'=>'<div class="form-group"><div class="col-md-3 control-label">{label}</div><div class="controls col-md-8">{input}{error}<div class="help-block"><div>变量说明：</div><ul><li>{{nickname}} 为接收方用户用户名</li><li>{{course}} 为课程名称</li></ul></div></div></div>>'])->textarea(['class'=>'form-control','row'=>'5']) ?>

<!--    <div class="form-group">-->
<!--      <div class="col-md-3 control-label">-->
<!--        <label for="welcome_message_body">欢迎私信内容</label>-->
<!--      </div>-->
<!--      <div class="controls col-md-8">-->
<!--        <textarea id="welcome_message_body" name="welcome_message_body" class="form-control" rows="5">{{nickname}},欢迎加入课程{{course}}</textarea>-->
<!--        <div class="help-block">-->
<!--          -->
<!--          <div>变量说明：</div>-->
<!--          <ul>-->
<!--            <li>{{nickname}} 为接收方用户用户名</li>-->
<!--            <li>{{course}} 为课程名称</li>-->
<!--          </ul>-->
<!--          -->
<!--        </div>-->
<!--      </div>-->
<!--    </div>-->

	  <?= $form->field($model, 'price_permissions')->radioList(['1'=>'开启','0'=>'关闭']) ?>

<!--    <div class="form-group">-->
<!--      <div class="col-md-3 control-label">-->
<!--        <label>允许教师设置课程价格</label>-->
<!--      </div>-->
<!--      <div class="controls col-md-8 radios">-->
<!--        <label><input name="teacher_modify_price" value="1" checked="checked" type="radio"> 是</label><label><input name="teacher_modify_price" value="0" type="radio"> 否</label>-->
<!--      </div>-->
<!--    </div>-->

	  <?= $form->field($model, 'order_permissions')->radioList(['1'=>'开启','0'=>'关闭']) ?>

<!--    <div class="form-group">-->
<!--      <div class="col-md-3 control-label">-->
<!--        <label>允许教师查询课程订单</label>-->
<!--      </div>-->
<!--      <div class="controls col-md-8 radios">-->
<!--        <label><input name="teacher_search_order" value="1" checked="checked" type="radio"> 是</label><label><input name="teacher_search_order" value="0" type="radio"> 否</label>-->
<!--      </div>-->
<!--    </div>-->

	  <?= $form->field($model, 'datum_permissions')->radioList(['1'=>'开启','0'=>'关闭']) ?>

<!--    <div class="form-group">-->
<!--      <div class="col-md-3 control-label">-->
<!--        <label>允许教师导出学员资料</label>-->
<!--      </div>-->
<!--      <div class="controls col-md-8 radios">-->
<!--        <label><input name="teacher_export_student" value="1" checked="checked" type="radio"> 是</label><label><input name="teacher_export_student" value="0" type="radio"> 否</label>-->
<!--      </div>-->
<!--    </div>-->

	  <?= $form->field($model, 'course_permissions')->radioList(['1'=>'开启','0'=>'关闭']) ?>

<!--    <div class="form-group">-->
<!--      <div class="col-md-3 control-label">-->
<!--        <label>课程详情页显示相关课程</label>-->
<!--      </div>-->
<!--      <div class="controls col-md-8 radios">-->
<!--        <label><input name="relatedCourses" value="1" checked="checked" type="radio"> 开启</label><label><input name="relatedCourses" value="0" type="radio"> 关闭</label>-->
<!--        <div class="help-block">根据课程的标签，显示相关课程</div>-->
<!--      </div>-->
<!--    </div>-->

	  <?= $form->field($model, 'copy_permissions')->radioList(['1'=>'开启','0'=>'关闭']) ?>

<!--     <div class="form-group">-->
<!--      <div class="col-md-3 control-label">-->
<!--        <label>图文、文档课时防复制</label>-->
<!--      </div>-->
<!--      <div class="controls col-md-8 radios">-->
<!--        <label><input name="copy_enabled" value="1" checked="checked" type="radio"> 开启</label><label><input name="copy_enabled" value="0" type="radio"> 关闭</label>-->
<!--        <div class="help-block"></div>-->
<!--      </div>-->
<!--    </div>-->

	  <?= $form->field($model, 'student_num_permissions')->radioList(['1'=>'开启','0'=>'关闭']) ?>

<!--    <div class="form-group">-->
<!--      <label class="col-md-3 control-label">课程中允许显示学员人数</label>-->
<!--      <div class="col-md-8 controls radios">-->
<!--        <label><input name="show_student_num_enabled" value="1" checked="checked" type="radio"> 开启</label><label><input name="show_student_num_enabled" value="0" type="radio"> 关闭</label>-->
<!--      </div>-->
<!--    </div>-->

  </fieldset>

  <div class="form-group">
    <div class="controls col-md-offset-3 col-md-8">
	    <?= Html::submitButton('提交', ['class'=>'btn btn-primary']) ?>
    </div>
  </div>
<?php ActiveForm::end();?>

        </div>

          </div>
  </div>
